package com.city.service.pub.impl;

import com.city.domain.pub.PubProvince;
import com.city.repository.pub.PubProvinceRepository;
import com.city.service.pub.PubProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @deprecation:
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-20 16:51
 */
@Service
public class PubProvinceServiceImpl implements PubProvinceService {
    @Autowired
    public PubProvinceRepository provinceRepository;

    @Override
    public List<PubProvince> findCode() {
        return provinceRepository.getAll();
//        return null;
    }

    /**
     * @Author: 李顺时
     * @Description: 通过省份代号查找对应省份名字
     * @Date: 16:17 2018/8/12
     */
    @Override
    public String findNameByCode(String code) {
        return provinceRepository.getNameByCode(code);
//        return null;
    }
}
